﻿@using ExcellentCRM.Site.Exts
@model IEnumerable<ExcellentCRM.DataService.Models.ContactRecord>
@{ Layout = null;}

@if (Model != null)
{
    <table class="table">
        <thead>
            <tr>
                <th>联系时间</th>
                <th>联系人</th>
                <th>联系内容摘要</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            @foreach (var contactRecord in Model.OrderByDescending(m => m.CreatedTime))
            {
                <tr>
                    <td>@string.Format("{0:yyyy-MM-dd HH:mm}", contactRecord.CreatedTime)</td>
                    <td>@contactRecord.Consultant.StaffName</td>
                    <td>@Html.CreateSummary(contactRecord.Comment)</td>
                    <td>
                        <a href="@Url.Action("ContactRecord", "StuClient", new {stuId = contactRecord.ContactStuId, contactId = contactRecord.Id})"
                           data-toggle="modal" data-target="#viewModal"
                           data-backdrop="static" data-keyboard="false" 
                           class="btn btn-small btn-info">
                            查看详细
                        </a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
}